package com.iursp.domain.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Transient;

public class UihPage<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    @Transient
    private long total; //总记录数
    @Transient
    private List<T> rows; //结果集
    @Transient
    private int pageNum; //第几页
    @Transient
    private int pageSize; //每页记录数
    @Transient
    private int pages; // 总页数
    @Transient
    private int size; //当前页的数量<=pageSize
    @Transient
    private int offset;
    
    public UihPage() {
		super();
	}
    
    public UihPage(long total, List<T> rows) {
		super();
		this.total = total;
		this.rows = rows;
	}
    
	public UihPage(long total, List<T> rows, int pageNum, int pageSize, int pages, int size) {
		super();
		this.total = total;
		this.rows = rows;
		this.pageNum = pageNum;
		this.pageSize = pageSize;
		this.pages = pages;
		this.size = size; 
	}

	public int getOffset() {
		return offset;
	}
	public void setOffset(int offset) {
		this.offset = offset;
	}
	public long getTotal() {
        return total;
    }
    public void setTotal(long total) {
        this.total = total;
    }
   
    public List<T> getRows() {
		return rows;
	}
	public void setRows(List<T> rows) {
		this.rows = rows;
	}
	public int getSize() {
        return size;
    }
    public void setSize(int size) {
        this.size = size;
    }
    public int getPageNum() {
        return pageNum;
    }
    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }
    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
    public int getPages() {
        return pages;
    }
    public void setPages(int pages) {
        this.pages = pages;
    }
}